//#########################################################################
//                              WackiEngie
//           Copyright (c) 2014 Marc Wacker. All rights reserved.
//#########################################################################

#pragma once

#include "WeUtilPrerequisites.h"
#include "WeModule.h"
#include "WeTimer.h"


namespace WackiEngine
{

	class Time : public Module<Time>
	{
	public:		
		// get delta time for the last frame
		float	getFrameDelta() { return _frameDelta; }

		// returns total time since start in seconds
		double	getTime() { return _timeS; }

		uint64	getCurrentFrame() { return _currentFrame; }
		

		void	update();

	private:
		Timer	_timer;

		float	_frameDelta;
		double	_timeS;

		uint64	_currentFrame = 0;
	};

	Time& gTime();

}